3.3.74 \(\int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^4} \, dx\) [274]
Optimal. Leaf size=301 \[ \frac {B x}{b^4}-\frac {\left (3 a^2 A b^5+2 A b^7+2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B-8 a b^6 B\right ) \text {ArcTan}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^4 (a+b)^{7/2} d}+\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a \left (a^2 A b^3-16 A b^5+9 a^5 B-28 a^3 b^2 B+34 a b^4 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))} \]
[Out]
B*x/b^4-(3*A*a^2*b^5+2*A*b^7+2*B*a^7-7*B*a^5*b^2+8*B*a^3*b^4-8*B*a*b^6)*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/
(a+b)^(1/2))/(a-b)^(7/2)/b^4/(a+b)^(7/2)/d+1/3*a*(A*b-B*a)*cos(d*x+c)^2*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos(d*x+
c))^3+1/6*a^2*(5*A*b^3+3*B*a^3-8*B*a*b^2)*sin(d*x+c)/b^3/(a^2-b^2)^2/d/(a+b*cos(d*x+c))^2-1/6*a*(A*a^2*b^3-16*
A*b^5+9*B*a^5-28*B*a^3*b^2+34*B*a*b^4)*sin(d*x+c)/b^3/(a^2-b^2)^3/d/(a+b*cos(d*x+c))
________________________________________________________________________________________
Rubi [A]
time = 0.78, antiderivative size = 301, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3068, 3110,
3100, 2814, 2738, 211} \begin {gather*} \frac {a (A b-a B) \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}+\frac {a^2 \left (3 a^3 B-8 a b^2 B+5 A b^3\right ) \sin (c+d x)}{6 b^3 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))^2}-\frac {a \left (9 a^5 B-28 a^3 b^2 B+a^2 A b^3+34 a b^4 B-16 A b^5\right ) \sin (c+d x)}{6 b^3 d \left (a^2-b^2\right )^3 (a+b \cos (c+d x))}-\frac {\left (2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B+3 a^2 A b^5-8 a b^6 B+2 A b^7\right ) \text {ArcTan}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^4 d (a-b)^{7/2} (a+b)^{7/2}}+\frac {B x}{b^4} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[(Cos[c + d*x]^3*(A + B*Cos[c + d*x]))/(a + b*Cos[c + d*x])^4,x]
[Out]
(B*x)/b^4 - ((3*a^2*A*b^5 + 2*A*b^7 + 2*a^7*B - 7*a^5*b^2*B + 8*a^3*b^4*B - 8*a*b^6*B)*ArcTan[(Sqrt[a - b]*Tan
[(c + d*x)/2])/Sqrt[a + b]])/((a - b)^(7/2)*b^4*(a + b)^(7/2)*d) + (a*(A*b - a*B)*Cos[c + d*x]^2*Sin[c + d*x])
/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) + (a^2*(5*A*b^3 + 3*a^3*B - 8*a*b^2*B)*Sin[c + d*x])/(6*b^3*(a^2 -
b^2)^2*d*(a + b*Cos[c + d*x])^2) - (a*(a^2*A*b^3 - 16*A*b^5 + 9*a^5*B - 28*a^3*b^2*B + 34*a*b^4*B)*Sin[c + d*
x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 2814
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 3068
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e
_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(b*c - a*d))*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1
)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Si
n[e + f*x])^(m - 2)*(c + d*Sin[e + f*x])^(n + 1)*Simp[b*(b*c - a*d)*(B*c - A*d)*(m - 1) + a*d*(a*A*c + b*B*c -
(A*b + a*B)*d)*(n + 1) + (b*(b*d*(B*c - A*d) + a*(A*c*d + B*(c^2 - 2*d^2)))*(n + 1) - a*(b*c - a*d)*(B*c - A*
d)*(n + 2))*Sin[e + f*x] + b*(d*(A*b*c + a*B*c - a*A*d)*(m + n + 1) - b*B*(c^2*m + d^2*(n + 1)))*Sin[e + f*x]^
2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2
, 0] && GtQ[m, 1] && LtQ[n, -1]
Rule 3100
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m
+ 1)*(a^2 - b^2))), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B +
a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b,
e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Rule 3110
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e
_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)
*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - Dist[1/(b^2*(m + 1)*(a^2 - b^2)
), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d +
b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] - b*C*d*(m
+ 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] &&
NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^4} \, dx &=\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}-\frac {\int \frac {\cos (c+d x) \left (-2 a (A b-a B)+3 b (A b-a B) \cos (c+d x)-3 \left (a^2-b^2\right ) B \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx}{3 b \left (a^2-b^2\right )}\\ &=\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {\int \frac {2 a b \left (5 A b^3+3 a^3 B-8 a b^2 B\right )+\left (a^2 A b^3-6 A b^5+3 a^5 B-10 a^3 b^2 B+12 a b^4 B\right ) \cos (c+d x)-6 b \left (a^2-b^2\right )^2 B \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx}{6 b^3 \left (a^2-b^2\right )^2}\\ &=\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a \left (a^2 A b^3-16 A b^5+9 a^5 B-28 a^3 b^2 B+34 a b^4 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}+\frac {\int \frac {-3 b \left (3 a^2 A b^4+2 A b^6-a^5 b B+2 a^3 b^3 B-6 a b^5 B\right )+6 b \left (a^2-b^2\right )^3 B \cos (c+d x)}{a+b \cos (c+d x)} \, dx}{6 b^4 \left (a^2-b^2\right )^3}\\ &=\frac {B x}{b^4}+\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a \left (a^2 A b^3-16 A b^5+9 a^5 B-28 a^3 b^2 B+34 a b^4 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac {\left (3 a^2 A b^5+2 A b^7+2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B-8 a b^6 B\right ) \int \frac {1}{a+b \cos (c+d x)} \, dx}{2 b^4 \left (a^2-b^2\right )^3}\\ &=\frac {B x}{b^4}+\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a \left (a^2 A b^3-16 A b^5+9 a^5 B-28 a^3 b^2 B+34 a b^4 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac {\left (3 a^2 A b^5+2 A b^7+2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B-8 a b^6 B\right ) \text {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^4 \left (a^2-b^2\right )^3 d}\\ &=\frac {B x}{b^4}-\frac {\left (3 a^2 A b^5+2 A b^7+2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B-8 a b^6 B\right ) \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^4 (a+b)^{7/2} d}+\frac {a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^2 \left (5 A b^3+3 a^3 B-8 a b^2 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a \left (a^2 A b^3-16 A b^5+9 a^5 B-28 a^3 b^2 B+34 a b^4 B\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(717\) vs. \(2(301)=602\).
time = 3.32, size = 717, normalized size = 2.38 \begin {gather*} \frac {-\frac {24 \left (3 a^2 A b^5+2 A b^7+2 a^7 B-7 a^5 b^2 B+8 a^3 b^4 B-8 a b^6 B\right ) \tanh ^{-1}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{7/2}}+\frac {24 a^9 B c-36 a^7 b^2 B c-36 a^5 b^4 B c+84 a^3 b^6 B c-36 a b^8 B c+24 a^9 B d x-36 a^7 b^2 B d x-36 a^5 b^4 B d x+84 a^3 b^6 B d x-36 a b^8 B d x+18 b \left (a^2-b^2\right )^3 \left (4 a^2+b^2\right ) B (c+d x) \cos (c+d x)+36 a b^2 \left (a^2-b^2\right )^3 B (c+d x) \cos (2 (c+d x))+6 a^6 b^3 B c \cos (3 (c+d x))-18 a^4 b^5 B c \cos (3 (c+d x))+18 a^2 b^7 B c \cos (3 (c+d x))-6 b^9 B c \cos (3 (c+d x))+6 a^6 b^3 B d x \cos (3 (c+d x))-18 a^4 b^5 B d x \cos (3 (c+d x))+18 a^2 b^7 B d x \cos (3 (c+d x))-6 b^9 B d x \cos (3 (c+d x))+18 a^5 A b^4 \sin (c+d x)+39 a^3 A b^6 \sin (c+d x)+18 a A b^8 \sin (c+d x)-24 a^8 b B \sin (c+d x)+57 a^6 b^3 B \sin (c+d x)-72 a^4 b^5 B \sin (c+d x)-36 a^2 b^7 B \sin (c+d x)+6 a^4 A b^5 \sin (2 (c+d x))+54 a^2 A b^7 \sin (2 (c+d x))-30 a^7 b^2 B \sin (2 (c+d x))+90 a^5 b^4 B \sin (2 (c+d x))-120 a^3 b^6 B \sin (2 (c+d x))+2 a^5 A b^4 \sin (3 (c+d x))-5 a^3 A b^6 \sin (3 (c+d x))+18 a A b^8 \sin (3 (c+d x))-11 a^6 b^3 B \sin (3 (c+d x))+32 a^4 b^5 B \sin (3 (c+d x))-36 a^2 b^7 B \sin (3 (c+d x))}{\left (a^2-b^2\right )^3 (a+b \cos (c+d x))^3}}{24 b^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[(Cos[c + d*x]^3*(A + B*Cos[c + d*x]))/(a + b*Cos[c + d*x])^4,x]
[Out]
((-24*(3*a^2*A*b^5 + 2*A*b^7 + 2*a^7*B - 7*a^5*b^2*B + 8*a^3*b^4*B - 8*a*b^6*B)*ArcTanh[((a - b)*Tan[(c + d*x)
/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(7/2) + (24*a^9*B*c - 36*a^7*b^2*B*c - 36*a^5*b^4*B*c + 84*a^3*b^6*B*c -
36*a*b^8*B*c + 24*a^9*B*d*x - 36*a^7*b^2*B*d*x - 36*a^5*b^4*B*d*x + 84*a^3*b^6*B*d*x - 36*a*b^8*B*d*x + 18*b*(
a^2 - b^2)^3*(4*a^2 + b^2)*B*(c + d*x)*Cos[c + d*x] + 36*a*b^2*(a^2 - b^2)^3*B*(c + d*x)*Cos[2*(c + d*x)] + 6*
a^6*b^3*B*c*Cos[3*(c + d*x)] - 18*a^4*b^5*B*c*Cos[3*(c + d*x)] + 18*a^2*b^7*B*c*Cos[3*(c + d*x)] - 6*b^9*B*c*C
os[3*(c + d*x)] + 6*a^6*b^3*B*d*x*Cos[3*(c + d*x)] - 18*a^4*b^5*B*d*x*Cos[3*(c + d*x)] + 18*a^2*b^7*B*d*x*Cos[
3*(c + d*x)] - 6*b^9*B*d*x*Cos[3*(c + d*x)] + 18*a^5*A*b^4*Sin[c + d*x] + 39*a^3*A*b^6*Sin[c + d*x] + 18*a*A*b
^8*Sin[c + d*x] - 24*a^8*b*B*Sin[c + d*x] + 57*a^6*b^3*B*Sin[c + d*x] - 72*a^4*b^5*B*Sin[c + d*x] - 36*a^2*b^7
*B*Sin[c + d*x] + 6*a^4*A*b^5*Sin[2*(c + d*x)] + 54*a^2*A*b^7*Sin[2*(c + d*x)] - 30*a^7*b^2*B*Sin[2*(c + d*x)]
+ 90*a^5*b^4*B*Sin[2*(c + d*x)] - 120*a^3*b^6*B*Sin[2*(c + d*x)] + 2*a^5*A*b^4*Sin[3*(c + d*x)] - 5*a^3*A*b^6
*Sin[3*(c + d*x)] + 18*a*A*b^8*Sin[3*(c + d*x)] - 11*a^6*b^3*B*Sin[3*(c + d*x)] + 32*a^4*b^5*B*Sin[3*(c + d*x)
] - 36*a^2*b^7*B*Sin[3*(c + d*x)])/((a^2 - b^2)^3*(a + b*Cos[c + d*x])^3))/(24*b^4*d)
________________________________________________________________________________________
Maple [A]
time = 0.90, size = 459, normalized size = 1.52
| | |
method |
result |
size |
| | |
derivativedivides |
\(\frac {-\frac {2 \left (\frac {-\frac {\left (2 A \,a^{2} b^{3}+3 A a \,b^{4}+6 A \,b^{5}-2 B \,a^{5}+B \,a^{4} b +6 B \,a^{3} b^{2}-4 B \,a^{2} b^{3}-12 B a \,b^{4}\right ) a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 b^{2} a +b^{3}\right )}-\frac {2 \left (A \,a^{2} b^{3}+9 A \,b^{5}-3 B \,a^{5}+11 B \,a^{3} b^{2}-18 B a \,b^{4}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (2 A \,a^{2} b^{3}-3 A a \,b^{4}+6 A \,b^{5}-2 B \,a^{5}-B \,a^{4} b +6 B \,a^{3} b^{2}+4 B \,a^{2} b^{3}-12 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 b^{2} a -b^{3}\right )}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )^{3}}+\frac {\left (3 A \,a^{2} b^{5}+2 A \,b^{7}+2 B \,a^{7}-7 B \,a^{5} b^{2}+8 B \,a^{3} b^{4}-8 B a \,b^{6}\right ) \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{4}}+\frac {2 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) |
\(459\) |
default |
\(\frac {-\frac {2 \left (\frac {-\frac {\left (2 A \,a^{2} b^{3}+3 A a \,b^{4}+6 A \,b^{5}-2 B \,a^{5}+B \,a^{4} b +6 B \,a^{3} b^{2}-4 B \,a^{2} b^{3}-12 B a \,b^{4}\right ) a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 b^{2} a +b^{3}\right )}-\frac {2 \left (A \,a^{2} b^{3}+9 A \,b^{5}-3 B \,a^{5}+11 B \,a^{3} b^{2}-18 B a \,b^{4}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (2 A \,a^{2} b^{3}-3 A a \,b^{4}+6 A \,b^{5}-2 B \,a^{5}-B \,a^{4} b +6 B \,a^{3} b^{2}+4 B \,a^{2} b^{3}-12 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 b^{2} a -b^{3}\right )}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )^{3}}+\frac {\left (3 A \,a^{2} b^{5}+2 A \,b^{7}+2 B \,a^{7}-7 B \,a^{5} b^{2}+8 B \,a^{3} b^{4}-8 B a \,b^{6}\right ) \arctan \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (a -b \right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{4}}+\frac {2 B \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}}{d}\) |
\(459\) |
risch |
\(\text {Expression too large to display}\) |
\(1751\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+b*cos(d*x+c))^4,x,method=_RETURNVERBOSE)
[Out]
1/d*(-2/b^4*((-1/2*(2*A*a^2*b^3+3*A*a*b^4+6*A*b^5-2*B*a^5+B*a^4*b+6*B*a^3*b^2-4*B*a^2*b^3-12*B*a*b^4)*a*b/(a-b
)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5-2/3*(A*a^2*b^3+9*A*b^5-3*B*a^5+11*B*a^3*b^2-18*B*a*b^4)*a*b/(
a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3-1/2*(2*A*a^2*b^3-3*A*a*b^4+6*A*b^5-2*B*a^5-B*a^4*b+6*B*a^3
*b^2+4*B*a^2*b^3-12*B*a*b^4)*a*b/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(a*tan(1/2*d*x+1/2*c)^2-b
*tan(1/2*d*x+1/2*c)^2+a+b)^3+1/2*(3*A*a^2*b^5+2*A*b^7+2*B*a^7-7*B*a^5*b^2+8*B*a^3*b^4-8*B*a*b^6)/(a^6-3*a^4*b^
2+3*a^2*b^4-b^6)/((a-b)*(a+b))^(1/2)*arctan(tan(1/2*d*x+1/2*c)*(a-b)/((a-b)*(a+b))^(1/2)))+2*B/b^4*arctan(tan(
1/2*d*x+1/2*c)))
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+b*cos(d*x+c))^4,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more de
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 894 vs.
\(2 (286) = 572\).
time = 0.53, size = 1857, normalized size = 6.17 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+b*cos(d*x+c))^4,x, algorithm="fricas")
[Out]
[1/12*(12*(B*a^8*b^3 - 4*B*a^6*b^5 + 6*B*a^4*b^7 - 4*B*a^2*b^9 + B*b^11)*d*x*cos(d*x + c)^3 + 36*(B*a^9*b^2 -
4*B*a^7*b^4 + 6*B*a^5*b^6 - 4*B*a^3*b^8 + B*a*b^10)*d*x*cos(d*x + c)^2 + 36*(B*a^10*b - 4*B*a^8*b^3 + 6*B*a^6*
b^5 - 4*B*a^4*b^7 + B*a^2*b^9)*d*x*cos(d*x + c) + 12*(B*a^11 - 4*B*a^9*b^2 + 6*B*a^7*b^4 - 4*B*a^5*b^6 + B*a^3
*b^8)*d*x + 3*(2*B*a^10 - 7*B*a^8*b^2 + 8*B*a^6*b^4 + 3*A*a^5*b^5 - 8*B*a^4*b^6 + 2*A*a^3*b^7 + (2*B*a^7*b^3 -
7*B*a^5*b^5 + 8*B*a^3*b^7 + 3*A*a^2*b^8 - 8*B*a*b^9 + 2*A*b^10)*cos(d*x + c)^3 + 3*(2*B*a^8*b^2 - 7*B*a^6*b^4
+ 8*B*a^4*b^6 + 3*A*a^3*b^7 - 8*B*a^2*b^8 + 2*A*a*b^9)*cos(d*x + c)^2 + 3*(2*B*a^9*b - 7*B*a^7*b^3 + 8*B*a^5*
b^5 + 3*A*a^4*b^6 - 8*B*a^3*b^7 + 2*A*a^2*b^8)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2
- b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c)
^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(6*B*a^10*b - 23*B*a^8*b^3 - 4*A*a^7*b^4 + 43*B*a^6*b^5 - 7*A*a^5*b^6 - 26
*B*a^4*b^7 + 11*A*a^3*b^8 + (11*B*a^8*b^3 - 2*A*a^7*b^4 - 43*B*a^6*b^5 + 7*A*a^5*b^6 + 68*B*a^4*b^7 - 23*A*a^3
*b^8 - 36*B*a^2*b^9 + 18*A*a*b^10)*cos(d*x + c)^2 + 3*(5*B*a^9*b^2 - 20*B*a^7*b^4 - A*a^6*b^5 + 35*B*a^5*b^6 -
8*A*a^4*b^7 - 20*B*a^3*b^8 + 9*A*a^2*b^9)*cos(d*x + c))*sin(d*x + c))/((a^8*b^7 - 4*a^6*b^9 + 6*a^4*b^11 - 4*
a^2*b^13 + b^15)*d*cos(d*x + c)^3 + 3*(a^9*b^6 - 4*a^7*b^8 + 6*a^5*b^10 - 4*a^3*b^12 + a*b^14)*d*cos(d*x + c)^
2 + 3*(a^10*b^5 - 4*a^8*b^7 + 6*a^6*b^9 - 4*a^4*b^11 + a^2*b^13)*d*cos(d*x + c) + (a^11*b^4 - 4*a^9*b^6 + 6*a^
7*b^8 - 4*a^5*b^10 + a^3*b^12)*d), 1/6*(6*(B*a^8*b^3 - 4*B*a^6*b^5 + 6*B*a^4*b^7 - 4*B*a^2*b^9 + B*b^11)*d*x*c
os(d*x + c)^3 + 18*(B*a^9*b^2 - 4*B*a^7*b^4 + 6*B*a^5*b^6 - 4*B*a^3*b^8 + B*a*b^10)*d*x*cos(d*x + c)^2 + 18*(B
*a^10*b - 4*B*a^8*b^3 + 6*B*a^6*b^5 - 4*B*a^4*b^7 + B*a^2*b^9)*d*x*cos(d*x + c) + 6*(B*a^11 - 4*B*a^9*b^2 + 6*
B*a^7*b^4 - 4*B*a^5*b^6 + B*a^3*b^8)*d*x - 3*(2*B*a^10 - 7*B*a^8*b^2 + 8*B*a^6*b^4 + 3*A*a^5*b^5 - 8*B*a^4*b^6
+ 2*A*a^3*b^7 + (2*B*a^7*b^3 - 7*B*a^5*b^5 + 8*B*a^3*b^7 + 3*A*a^2*b^8 - 8*B*a*b^9 + 2*A*b^10)*cos(d*x + c)^3
+ 3*(2*B*a^8*b^2 - 7*B*a^6*b^4 + 8*B*a^4*b^6 + 3*A*a^3*b^7 - 8*B*a^2*b^8 + 2*A*a*b^9)*cos(d*x + c)^2 + 3*(2*B
*a^9*b - 7*B*a^7*b^3 + 8*B*a^5*b^5 + 3*A*a^4*b^6 - 8*B*a^3*b^7 + 2*A*a^2*b^8)*cos(d*x + c))*sqrt(a^2 - b^2)*ar
ctan(-(a*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - (6*B*a^10*b - 23*B*a^8*b^3 - 4*A*a^7*b^4 + 43*B*a
^6*b^5 - 7*A*a^5*b^6 - 26*B*a^4*b^7 + 11*A*a^3*b^8 + (11*B*a^8*b^3 - 2*A*a^7*b^4 - 43*B*a^6*b^5 + 7*A*a^5*b^6
+ 68*B*a^4*b^7 - 23*A*a^3*b^8 - 36*B*a^2*b^9 + 18*A*a*b^10)*cos(d*x + c)^2 + 3*(5*B*a^9*b^2 - 20*B*a^7*b^4 - A
*a^6*b^5 + 35*B*a^5*b^6 - 8*A*a^4*b^7 - 20*B*a^3*b^8 + 9*A*a^2*b^9)*cos(d*x + c))*sin(d*x + c))/((a^8*b^7 - 4*
a^6*b^9 + 6*a^4*b^11 - 4*a^2*b^13 + b^15)*d*cos(d*x + c)^3 + 3*(a^9*b^6 - 4*a^7*b^8 + 6*a^5*b^10 - 4*a^3*b^12
+ a*b^14)*d*cos(d*x + c)^2 + 3*(a^10*b^5 - 4*a^8*b^7 + 6*a^6*b^9 - 4*a^4*b^11 + a^2*b^13)*d*cos(d*x + c) + (a^
11*b^4 - 4*a^9*b^6 + 6*a^7*b^8 - 4*a^5*b^10 + a^3*b^12)*d)]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)**3*(A+B*cos(d*x+c))/(a+b*cos(d*x+c))**4,x)
[Out]
Timed out
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 813 vs.
\(2 (286) = 572\).
time = 0.49, size = 813, normalized size = 2.70 \begin {gather*} \frac {\frac {3 \, {\left (2 \, B a^{7} - 7 \, B a^{5} b^{2} + 8 \, B a^{3} b^{4} + 3 \, A a^{2} b^{5} - 8 \, B a b^{6} + 2 \, A b^{7}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{6} b^{4} - 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} - b^{10}\right )} \sqrt {a^{2} - b^{2}}} + \frac {3 \, {\left (d x + c\right )} B}{b^{4}} - \frac {6 \, B a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, B a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, B a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, A a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 45 \, B a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, A a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, B a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, A a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 60 \, B a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 27 \, A a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, B a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 18 \, A a b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, B a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 56 \, B a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, A a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 116 \, B a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 32 \, A a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, B a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A a b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, B a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, B a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, B a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, A a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 45 \, B a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, A a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, B a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, A a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60 \, B a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 27 \, A a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, B a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 18 \, A a b^{7} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{6} b^{3} - 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} - b^{9}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b\right )}^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c))/(a+b*cos(d*x+c))^4,x, algorithm="giac")
[Out]
1/3*(3*(2*B*a^7 - 7*B*a^5*b^2 + 8*B*a^3*b^4 + 3*A*a^2*b^5 - 8*B*a*b^6 + 2*A*b^7)*(pi*floor(1/2*(d*x + c)/pi +
1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^6*b^4 -
3*a^4*b^6 + 3*a^2*b^8 - b^10)*sqrt(a^2 - b^2)) + 3*(d*x + c)*B/b^4 - (6*B*a^8*tan(1/2*d*x + 1/2*c)^5 - 15*B*a
^7*b*tan(1/2*d*x + 1/2*c)^5 - 6*B*a^6*b^2*tan(1/2*d*x + 1/2*c)^5 - 6*A*a^5*b^3*tan(1/2*d*x + 1/2*c)^5 + 45*B*a
^5*b^3*tan(1/2*d*x + 1/2*c)^5 + 3*A*a^4*b^4*tan(1/2*d*x + 1/2*c)^5 - 6*B*a^4*b^4*tan(1/2*d*x + 1/2*c)^5 - 6*A*
a^3*b^5*tan(1/2*d*x + 1/2*c)^5 - 60*B*a^3*b^5*tan(1/2*d*x + 1/2*c)^5 + 27*A*a^2*b^6*tan(1/2*d*x + 1/2*c)^5 + 3
6*B*a^2*b^6*tan(1/2*d*x + 1/2*c)^5 - 18*A*a*b^7*tan(1/2*d*x + 1/2*c)^5 + 12*B*a^8*tan(1/2*d*x + 1/2*c)^3 - 56*
B*a^6*b^2*tan(1/2*d*x + 1/2*c)^3 - 4*A*a^5*b^3*tan(1/2*d*x + 1/2*c)^3 + 116*B*a^4*b^4*tan(1/2*d*x + 1/2*c)^3 -
32*A*a^3*b^5*tan(1/2*d*x + 1/2*c)^3 - 72*B*a^2*b^6*tan(1/2*d*x + 1/2*c)^3 + 36*A*a*b^7*tan(1/2*d*x + 1/2*c)^3
+ 6*B*a^8*tan(1/2*d*x + 1/2*c) + 15*B*a^7*b*tan(1/2*d*x + 1/2*c) - 6*B*a^6*b^2*tan(1/2*d*x + 1/2*c) - 6*A*a^5
*b^3*tan(1/2*d*x + 1/2*c) - 45*B*a^5*b^3*tan(1/2*d*x + 1/2*c) - 3*A*a^4*b^4*tan(1/2*d*x + 1/2*c) - 6*B*a^4*b^4
*tan(1/2*d*x + 1/2*c) - 6*A*a^3*b^5*tan(1/2*d*x + 1/2*c) + 60*B*a^3*b^5*tan(1/2*d*x + 1/2*c) - 27*A*a^2*b^6*ta
n(1/2*d*x + 1/2*c) + 36*B*a^2*b^6*tan(1/2*d*x + 1/2*c) - 18*A*a*b^7*tan(1/2*d*x + 1/2*c))/((a^6*b^3 - 3*a^4*b^
5 + 3*a^2*b^7 - b^9)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 + a + b)^3))/d
________________________________________________________________________________________
Mupad [B]
time = 12.58, size = 2500, normalized size = 8.31 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((cos(c + d*x)^3*(A + B*cos(c + d*x)))/(a + b*cos(c + d*x))^4,x)
[Out]
((tan(c/2 + (d*x)/2)^5*(3*A*a^2*b^4 - 2*B*a^6 + 2*A*a^3*b^3 - 12*B*a^2*b^4 - 4*B*a^3*b^3 + 6*B*a^4*b^2 + 6*A*a
*b^5 + B*a^5*b))/((a*b^3 - b^4)*(a + b)^3) - (tan(c/2 + (d*x)/2)*(2*B*a^6 + 3*A*a^2*b^4 - 2*A*a^3*b^3 + 12*B*a
^2*b^4 - 4*B*a^3*b^3 - 6*B*a^4*b^2 - 6*A*a*b^5 + B*a^5*b))/((a + b)*(3*a*b^5 - b^6 - 3*a^2*b^4 + a^3*b^3)) + (
4*tan(c/2 + (d*x)/2)^3*(A*a^3*b^3 - 3*B*a^6 - 18*B*a^2*b^4 + 11*B*a^4*b^2 + 9*A*a*b^5))/(3*(a + b)^2*(b^5 - 2*
a*b^4 + a^2*b^3)))/(d*(3*a*b^2 - tan(c/2 + (d*x)/2)^4*(3*a*b^2 + 3*a^2*b - 3*a^3 - 3*b^3) - tan(c/2 + (d*x)/2)
^2*(3*a*b^2 - 3*a^2*b - 3*a^3 + 3*b^3) + 3*a^2*b + a^3 + b^3 + tan(c/2 + (d*x)/2)^6*(3*a*b^2 - 3*a^2*b + a^3 -
b^3))) + (2*B*atan(((B*((8*tan(c/2 + (d*x)/2)*(4*A^2*b^14 + 8*B^2*a^14 + 4*B^2*b^14 - 8*B^2*a*b^13 - 8*B^2*a^
13*b + 12*A^2*a^2*b^12 + 9*A^2*a^4*b^10 + 44*B^2*a^2*b^12 + 48*B^2*a^3*b^11 - 92*B^2*a^4*b^10 - 120*B^2*a^5*b^
9 + 156*B^2*a^6*b^8 + 160*B^2*a^7*b^7 - 164*B^2*a^8*b^6 - 120*B^2*a^9*b^5 + 117*B^2*a^10*b^4 + 48*B^2*a^11*b^3
- 48*B^2*a^12*b^2 - 32*A*B*a*b^13 - 16*A*B*a^3*b^11 + 20*A*B*a^5*b^9 - 34*A*B*a^7*b^7 + 12*A*B*a^9*b^5))/(a*b
^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a
^9*b^8 - a^10*b^7 - a^11*b^6) + (B*((8*(4*A*b^21 + 4*B*b^21 - 6*A*a^2*b^19 + 6*A*a^3*b^18 - 6*A*a^4*b^17 + 6*A
*a^5*b^16 + 14*A*a^6*b^15 - 14*A*a^7*b^14 - 6*A*a^8*b^13 + 6*A*a^9*b^12 - 12*B*a^2*b^19 + 64*B*a^3*b^18 + 20*B
*a^4*b^17 - 110*B*a^5*b^16 - 30*B*a^6*b^15 + 110*B*a^7*b^14 + 30*B*a^8*b^13 - 70*B*a^9*b^12 - 14*B*a^10*b^11 +
26*B*a^11*b^10 + 2*B*a^12*b^9 - 4*B*a^13*b^8 - 4*A*a*b^20 - 16*B*a*b^20))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3
*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9
) - (B*tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^17 - 120*a^6*b^16 - 1
60*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 + 8*a^13*b^9 - 8*a^14*
b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10
+ 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4))/b^4 + (B*((8*tan(c/2 + (d*x)/2)*(4*A^2*b^14 + 8*B^
2*a^14 + 4*B^2*b^14 - 8*B^2*a*b^13 - 8*B^2*a^13*b + 12*A^2*a^2*b^12 + 9*A^2*a^4*b^10 + 44*B^2*a^2*b^12 + 48*B^
2*a^3*b^11 - 92*B^2*a^4*b^10 - 120*B^2*a^5*b^9 + 156*B^2*a^6*b^8 + 160*B^2*a^7*b^7 - 164*B^2*a^8*b^6 - 120*B^2
*a^9*b^5 + 117*B^2*a^10*b^4 + 48*B^2*a^11*b^3 - 48*B^2*a^12*b^2 - 32*A*B*a*b^13 - 16*A*B*a^3*b^11 + 20*A*B*a^5
*b^9 - 34*A*B*a^7*b^7 + 12*A*B*a^9*b^5))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12
- 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6) - (B*((8*(4*A*b^21 + 4*B*b^21 - 6*A
*a^2*b^19 + 6*A*a^3*b^18 - 6*A*a^4*b^17 + 6*A*a^5*b^16 + 14*A*a^6*b^15 - 14*A*a^7*b^14 - 6*A*a^8*b^13 + 6*A*a^
9*b^12 - 12*B*a^2*b^19 + 64*B*a^3*b^18 + 20*B*a^4*b^17 - 110*B*a^5*b^16 - 30*B*a^6*b^15 + 110*B*a^7*b^14 + 30*
B*a^8*b^13 - 70*B*a^9*b^12 - 14*B*a^10*b^11 + 26*B*a^11*b^10 + 2*B*a^12*b^9 - 4*B*a^13*b^8 - 4*A*a*b^20 - 16*B
*a*b^20))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5
*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) + (B*tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 +
48*a^4*b^18 + 120*a^5*b^17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^
11*b^11 + 48*a^12*b^10 + 8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b
^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4))/b^4)/
((16*(4*B^3*a^13 - 4*A*B^2*b^13 + 4*A^2*B*b^13 + 16*B^3*a*b^12 - 2*B^3*a^12*b + 48*B^3*a^2*b^11 - 64*B^3*a^3*b
^10 - 64*B^3*a^4*b^9 + 110*B^3*a^5*b^8 + 66*B^3*a^6*b^7 - 110*B^3*a^7*b^6 - 34*B^3*a^8*b^5 + 70*B^3*a^9*b^4 +
11*B^3*a^10*b^3 - 26*B^3*a^11*b^2 - 28*A*B^2*a*b^12 + 6*A*B^2*a^2*b^11 - 22*A*B^2*a^3*b^10 + 6*A*B^2*a^4*b^9 +
14*A*B^2*a^5*b^8 - 14*A*B^2*a^6*b^7 - 20*A*B^2*a^7*b^6 + 6*A*B^2*a^8*b^5 + 6*A*B^2*a^9*b^4 + 12*A^2*B*a^2*b^1
1 + 9*A^2*B*a^4*b^9))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*
a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) - (B*((8*tan(c/2 + (d*x)/2)*(4*A^2*b^14 + 8*B^2*a^1
4 + 4*B^2*b^14 - 8*B^2*a*b^13 - 8*B^2*a^13*b + 12*A^2*a^2*b^12 + 9*A^2*a^4*b^10 + 44*B^2*a^2*b^12 + 48*B^2*a^3
*b^11 - 92*B^2*a^4*b^10 - 120*B^2*a^5*b^9 + 156*B^2*a^6*b^8 + 160*B^2*a^7*b^7 - 164*B^2*a^8*b^6 - 120*B^2*a^9*
b^5 + 117*B^2*a^10*b^4 + 48*B^2*a^11*b^3 - 48*B^2*a^12*b^2 - 32*A*B*a*b^13 - 16*A*B*a^3*b^11 + 20*A*B*a^5*b^9
- 34*A*B*a^7*b^7 + 12*A*B*a^9*b^5))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*
a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6) + (B*((8*(4*A*b^21 + 4*B*b^21 - 6*A*a^2*
b^19 + 6*A*a^3*b^18 - 6*A*a^4*b^17 + 6*A*a^5*b^16 + 14*A*a^6*b^15 - 14*A*a^7*b^14 - 6*A*a^8*b^13 + 6*A*a^9*b^1
2 - 12*B*a^2*b^19 + 64*B*a^3*b^18 + 20*B*a^4*b^...
________________________________________________________________________________________